<div class="m-hd">
  <div class="title">
    <h1>设置头像</h1>
    <div class="small">Avatar</div>
  </div>
  <div class="f-cb"></div>
</div>
<div class="f-sep10"></div>
<div class="f-sep10"></div>
<div class="f-sep10"></div>
<div class="m-form m-form-1">
    <center><div id="avatar"></div></center>
    <div class="f-cb"></div>
  </div>
<script src="__PUBLICAPP__/js/swfobject.js"></script>
<script>
var uploadevent = new function(){}; 
Do.ready('base','form','dialog',function() {
	window.uploadevent = function uploadevent(status) {
		if(status=='y'){
			$.dialog.tips('头像设置成功！', 3);
		}else{
			$.dialog.tips('头像设置失败！', 3);
		}
	}
	var flashvars = {
		"jsfunc": "uploadevent",
		"imgUrl" : "<?php echo model('Member')->getAvatar($userInfo['user_id'],0); ?>",
		"pid": "{$userInfo.uid}",
		"uploadSrc": true,
		"showBrow": true,
		"showCame": true,
		"uploadUrl": "<?php echo url('member/MemberSetting/saveAvatar',array('action'=>uploadavatar)); ?>",
		"pSize":"300|300|120|120|64|64|32|32|",
	}, params = {
		"menu": "false",
		"scale": "noScale",
		"allowFullscreen": "true",
		"allowScriptAccess": "always",
		"wmode": "transparent",
		"bgcolor": "#FFFFFF"
	}, attributes = {
		"id": "avatar"
	};
	swfobject.embedSWF("__PUBLICAPP__/images/FaustCplus.swf", "avatar", "650", "500", "9.0.0", "__PUBLICAPP__/images/expressInstall.swf", flashvars, params, attributes);
});
</script>